<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
    <style>
        * {
            box-sizing: border-box;      
        }
        body {
            margin: 0;

        }
    </style>
</head>
<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.inc.min.js"></script>
<body id="scanBtn">
    <img src="/shop/bindsuccess.jpg" style="width:100%"/>
    
</body>

</html>
<script type="text/javascript">
    var scanBtn = document.getElementById('scanBtn');
    //调用支付宝扫一扫
    scanBtn.onClick = function(){
      ap.scan(
          {type:'bar' },//默认qr  可选有bar 条形码  qr 二维码
          function(res){
            console.log(res.code); /* 查询到的信息 */
            //do something...
      })
    }
</script>